10. Lab: Traffic Sign Inference

Traffic Sign Inference

top: construction sign, bottom: stop sign

top: construction sign, bottom: stop sign

Next, run python traffic_sign_inference.py, and see how well the classifier performs on the example construction and stop signs.

OH NO!

AlexNet expects a 227x227x3 pixel image, whereas the traffic sign images are 32x32x3 pixels.

In order to feed the traffic sign images into AlexNet, you'll need to resize the images to the dimensions that AlexNet expects.

You could resize the images outside of this program, but that approach doesn't scale well. Instead, use the tf.image.resize_images method to resize the images as they are fed into the model.

Open up traffic_sign_inference.py and complete the TODO(s).

Your output should look similar to this:

Image 0
screen, CRT screen: 0.051
digital clock: 0.041
laptop, laptop computer: 0.030
balance beam, beam: 0.027
parallel bars, bars: 0.023

Image 1
digital watch: 0.395
digital clock: 0.275
bottlecap: 0.115
stopwatch, stop watch: 0.104
combination lock: 0.086

Time: 0.592 seconds